<template>
	<view class="find" :style="{ paddingTop: safeAreaTop + 'px' }">
		<up-input placeholder="搜索智能体" prefixIcon="search" prefixIconStyle="font-size: 16px;color: #A6A6A6" />
		<view class="category flex-r s-b mt-1 p-1">
			<view :class="{'active':categoryIndex===0}" @click="categoryIndex=0">推荐</view>
			<view :class="{'active':categoryIndex===1}" @click="categoryIndex=1">精选</view>
			<view :class="{'active':categoryIndex===2}" @click="categoryIndex=2">人类图</view>
			<view :class="{'active':categoryIndex===3}" @click="categoryIndex=3">星座</view>
			<view :class="{'active':categoryIndex===4}" @click="categoryIndex=4">MBTI</view>
		</view>
		<view class="find-banner mt-1"></view>
		<view class="content mt-1">
			<view class="items flex-r s-b a-c">
				<view class="flex-r a-c">
					<view class="icon"></view>
					<view class="ml-1 flex1">
						<view class="title">
							人类图解惑
						</view>
						<text>用来专业客观解读人类图，揭示个人性格天赋等关键信息</text>
					</view>
				</view>
				<view class="ml-3">
					<text class="iconfont-color icon-shoucang" />
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	const safeAreaTop = uni.$safeArea?.safeAreaTop || 44;
	const categoryIndex = ref(0)
</script>

<style lang="scss" scoped>
	.find {
		padding: 20rpx;

		.category {
			view {
				font-size: 30rpx;
				color: #000000;
				background: #FFFFFF;
				box-shadow: 0px 0px 1px 0px #BDBDBD;
				border-radius: 20rpx;
				padding: 14rpx 24rpx;
			}

			.active {
				color: #fff;
				background: #FF9281;
			}
		}

		.find-banner {
			width: 100%;
			height: 280rpx;
			border-radius: 16rpx;
			background-color: #ffefd3;
		}

		.content {
			.items {
				margin-bottom: 40rpx;
				.icon {
					width: 116rpx;
					height: 116rpx;
					background: #334ED5;
					border-radius: 50%;
				}

				.title {
					font-weight: 500;
					font-size: 32rpx;
					color: #000000;
					margin-bottom: 10rpx;
				}

				text {
					font-size: 13px;
					color: #0B0B0B;
					line-height: 18px;
				}
				.iconfont-color{
					font-size: 56rpx;
				}
			}
		}
	}
</style>